﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Lilium.UI.Forms;

namespace Autocomplete
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            /*
            textBox1.EnableAutocomplete(formViewAdapter1)
                .CompletionListNeeded += (object sender, CompletionListNeededEventArgs e) =>
                    {
                        e.CompletionList = CreateCompletionList(e.TypedText);
                    };
            
            comboBox1.EnableAutocomplete(formViewAdapter1);
             * */
        }

        private IEnumerable<object> CreateCompletionList(string p)
        {
            for (int a = 0; a < 5; a++)
                yield return p + new string(Enumerable.Repeat(p[p.Length - 1], 5).ToArray());
        }
    }
}